package com.ems.mapper;

import com.ems.entity.MerchantEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ems.vo.MerchantVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 商户/部门表 Mapper 接口
 * </p>
 *
 * @author WuZH
 * @since 2023-10-24
 */
@Mapper
public interface MerchantMapper extends BaseMapper<MerchantEntity> {

    @Select ( value = "<script>SELECT * FROM merchant_info mi LIMIT #{merchantVo.page},#{merchantVo.limit}</script>" )
    List<MerchantVo> queryList ( @Param ( "merchantVo" ) MerchantVo merchantVo );

    @Select ( value = "<script>SELECT COUNT(1) FROM merchant_info mi</script>" )
    Integer queryCount ( @Param ( "merchantVo" ) MerchantVo merchantVo );

}
